package model;

import annotion.Column;
import annotion.Id;
import annotion.Relation;

import java.io.Serializable;
import java.lang.annotation.Retention;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description:
 * @Author one world
 * @Date 2020/9/22 0022 13:56
 */
public class Seckill implements Serializable {
    @Id
    private int id;
    @Relation("goods_id")
    private Goods goods;
    @Column("start")
    private Date start_time;
    @Column("end")
    private Date end_time;
    private int stotal;
    private int num;
    @Column("price")
    private BigDecimal sprice;
    private int state;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }

    public Date getStart_time() {
        return start_time;
    }

    public void setStart_time(Date start_time) {
        this.start_time = start_time;
    }

    public Date getEnd_time() {
        return end_time;
    }

    public void setEnd_time(Date ent_time) {
        this.end_time = ent_time;
    }

    public int getStotal() {
        return stotal;
    }

    public void setStotal(int stotal) {
        this.stotal = stotal;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public BigDecimal getSprice() {
        return sprice;
    }

    public void setSprice(BigDecimal sprice) {
        this.sprice = sprice;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "Seckill{" +
                "id=" + id +
                ", goods=" + goods +
                ", start_time=" + start_time +
                ", end_time=" + end_time +
                ", stotal=" + stotal +
                ", num=" + num +
                ", sprice=" + sprice +
                ", state=" + state +
                '}';
    }
}
